<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>表单组合</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="__STATIC__/extends/AmazeUI-2.7.2/css/amazeui.css">
    <link href="__STATIC__/css/base.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="__STATIC__/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__STATIC__/layuiadmin/style/admin.css" media="all">

    <script src="__STATIC__/js/jquery-1.8.3.min.js"></script>
    <script src="__STATIC__/extends/AmazeUI-2.7.2/js/amazeui.min.js"></script>

    <link rel="stylesheet" href="__STATIC__/css/seller.css">
    <link rel="stylesheet" href="__STATIC__/css/seller_goods.css">
    <script src="__STATIC__/js/common1.js"></script>
</head>
<body>

<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header">编辑配置参数</div>
        <div class="layui-card-body" style="padding: 15px;">
            <form class="layui-form" action="" method="post" lay-filter="component-form-group">

                <div class="layui-form-item">
                    <label class="layui-form-label">配置参数名称：</label>
                    <div class="layui-input-block formControls">
                        <input type="text" lay-verify="title" autocomplete="off" placeholder="配置参数大写英文名称不能为空"  name="config_name"  value="{$config_one['config_name']}" datatype="*" nullmsg="配置参数英文名称不能为空！" ajaxurl="{:url('Config/ajaxConfigName',array('config_id'=>$config_one['config_id']))}" class="layui-input">
                        <span class="Validform_checktip"></span>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">配置参数中文名称：</label>
                    <div class="layui-input-block formControls">
                        <input type="text" lay-verify="title" autocomplete="off" placeholder="配置参数英文名称不能为空"  name="config_title" value="{$config_one['config_title']}" datatype="*" nullmsg="配置参数中文名称不能为空！" ajaxurl="{:url('Config/ajaxConfigTitle',array('config_id'=>$config_one['config_id']))}" class="layui-input">
                        <span class="Validform_checktip"></span>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">提示信息：</label>
                    <div class="layui-input-block">
                        <textarea  name="config_message"  placeholder="提示信息" class="layui-textarea">{$config_one['config_message']}</textarea>
                        <span class="Validform_checktip"></span>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">显示类型:</label>
                    <div class="layui-input-block">
                        <input type="radio" name="config_type" value="text" {if $config_one['config_type'] eq 'text'}checked{/if} title="text">
                        <input type="radio" name="config_type" value="radio" {if $config_one['config_type'] eq 'radio'}checked{/if} title="radio">
                        <input type="radio" name="config_type" value="textarea" {if $config_one['config_type'] eq 'textarea'}checked{/if} title="textarea">
                        <input type="radio" name="config_type" value="select"  {if $config_one['config_type'] eq 'select'}checked{/if} title="select">
                        <input type="radio" name="config_type" value="file" {if $config_one['config_type'] eq 'file'}checked{/if} title="file">
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">配置值：</label>
                    <div class="layui-input-block">
                        <textarea  name="config_value"  placeholder="配置值" class="layui-textarea">{$config_one['config_value']}</textarea>
                        <span class="Validform_checktip"></span>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">参数(仅对radio与select有效)：</label>
                    <div class="layui-input-block">
                        <textarea  name="config_info"  placeholder="配置值" class="layui-textarea">{$config_one['config_info']}</textarea>
                        <span class="Validform_checktip"></span>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">配置参数排序：</label>
                    <div class="layui-input-block">
                        <input type="text" name="config_sort" value="{$config_one['config_sort']}" datatype="*" nullmsg="配置参数排序不能为空！" lay-verify="title" autocomplete="off" value="50" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">是否开启:</label>
                    <div class="layui-input-block">
                        <input type="radio" name="config_status" value="1" {if condition="$config_one['config_status'] eq '1'"}checked{/if} title="是" >
                        <input type="radio" name="config_status" value="0" {if condition="$config_one['config_status'] eq '0'"}checked{/if} title="否">

                    </div>
                </div>
                <div class="layui-form-item layui-layout-admin">
                    <div class="layui-input-block">
                        <div class="layui-footer" style="left: 0;">
                            <input type="hidden" name="config_id" value="{$config_one['config_id']}" >
                            <input type="hidden" name="group_id" value="{$config_one['group_id']}" >
                            <button class="layui-btn" lay-submit="" lay-filter="component-form-demo1">立即提交</button>
                            <a href="{:url('config/index',array('group_id'=>$config_one['group_id']))}" class="layui-btn layui-btn-primary">返回{$group_id}</a>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<script type="text/javascript" src="__STATIC__/Widget/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript">
    $(function() {
        //表单验证
        $("form").Validform({
            tiptype:function(msg,o,cssctl){
                if(!o.obj.is("form")){
                    //默认表单
                    var objtip=o.obj.parents(".formControls").find(".Validform_checktip");
                    cssctl(objtip,o.type);
                    objtip.text(msg);
                }
            },
            showAllError:true
        })
    });
</script>

<script src="__STATIC__/layuiadmin/layui/layui.js"></script>
<script>
    layui.config({
        base: '__STATIC__/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'laydate'], function(){
        var $ = layui.$
            ,admin = layui.admin
            ,element = layui.element
            ,layer = layui.layer
            ,laydate = layui.laydate
            ,form = layui.form;

        form.render(null, 'component-form-group');

        laydate.render({
            elem: '#LAY-component-form-group-date'
        });


    });
</script>
</body>
</html>
